<template>
  <div>
    <div class="app-container">
      <el-form ref="postForm" :model="postForm" :label-position="'right'" label-width="80px">
        <el-row type="flex" justify="space-between" :gutter="20">
          <el-col :span="6">
            <el-form-item label="标题:">
              <el-input v-model="postForm.searchName" placeholder="请输入内容" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item>
              <el-button type="primary" size="small" @click="query()">查询</el-button>
            </el-form-item>
          </el-col>
          <el-col :span="12" />
        </el-row>
      </el-form>
      <el-table
        :data="tableData"
        border
      >
        <el-table-column
          prop="title"
          header-align="center"
          align="center"
          label="标题"
        />
        <el-table-column
          prop="sendUserName"
          header-align="center"
          align="center"
          label="创建人"
        />
        <el-table-column
          prop="type"
          header-align="center"
          align="center"
          label="类型"
        >
          <template slot-scope="scope">
            <el-tag v-if="scope.row.type === 1" size="small">印章使用审批表</el-tag>
            <el-tag v-else-if="scope.row.type === 2" size="small">签呈单</el-tag>
            <el-tag v-else-if="scope.row.type === 3" size="small">请示批复表</el-tag>
            <el-tag v-else-if="scope.row.type === 4" size="small">工作计划行政考核申诉单</el-tag>
            <el-tag v-else-if="scope.row.type === 5" size="small">转正工作评估表</el-tag>
            <el-tag v-else-if="scope.row.type === 6" size="small">员工离职审批表</el-tag>
            <el-tag v-else-if="scope.row.type === 7" size="small">应聘人员录用流程表</el-tag>
            <el-tag v-else-if="scope.row.type === 8" size="small">员工调动审批表</el-tag>
            <el-tag v-else-if="scope.row.type === 9" size="small">固定资产调拨单</el-tag>
            <el-tag v-else-if="scope.row.type === 10" size="small">红酒调拨单</el-tag>
            <el-tag v-else size="small">采购申请单</el-tag>
          </template>
        </el-table-column>
        <el-table-column
          prop="crtTime"
          header-align="center"
          align="center"
          label="创建时间"
        />
        <el-table-column
          prop="copySendUsersName"
          header-align="center"
          align="center"
          label="抄送人"
        >
          <template scope="scope">
            <el-tooltip v-if="scope.row.copySendUsersName" class="item" effect="dark" :content="scope.row.copySendUsersName" placement="top">
              <span>{{ scope.row.copySendUsersName.length > 20 ? scope.row.copySendUsersName.substr(0,20) + "..." : scope.row.copySendUsersName }}</span>
            </el-tooltip>
            <span v-else>{{ scope.row.copySendUsersName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="auditState"
          header-align="center"
          align="center"
          label="状态"
        >
          <template slot-scope="scope">
            <el-tag v-if="scope.row.auditState === 0" size="small">未审</el-tag>
            <el-tag v-else-if="scope.row.auditState === 1" size="small">审核中</el-tag>
            <el-tag v-else size="small">已审</el-tag>
          </template>
        </el-table-column>
        <el-table-column
          fixed="right"
          header-align="center"
          align="center"
          label="操作"
        >
          <template slot-scope="scope">
            <el-button
              type="button"
              class="el-button el-button--primary el-button--mini"
              @click="editInfo(scope.$index, scope.row)"
            >查看
            </el-button>
          </template>
        </el-table-column>
      </el-table>

      <el-row type="flex" class="row-bg" justify="center">
        <el-pagination
          background
          layout="total,  prev, pager, next, jumper"
          :total="total"
          :current-page.sync="currentPage"
          :page-size="pageSize"
          @current-change="handleCurrentChange"
        />
      </el-row>
    </div>
    <el-dialog
      :title="title"
      :visible.sync="centerDialogVisible"
      center
    >
      <el-form ref="info" :model="info" label-position="left" label-width="100px">
        <el-row type="flex" justify="space-between" :gutter="20">
          <el-col :span="12">
            <el-form-item label="标题:">
              <el-input v-model="info.title" readonly />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="类型:">
              <el-input v-if="info.type === 1" value="印章使用审批表" readonly />
              <el-input v-else-if="info.type === 2" value="签呈单" readonly />
              <el-input v-else-if="info.type === 3" value="请示批复表" readonly />
              <el-input v-else-if="info.type === 4" value="工作计划行政考核申诉单" readonly />
              <el-input v-else-if="info.type === 5" value="转正工作评估表" readonly />
              <el-input v-else-if="info.type === 6" value="员工离职审批表" readonly />
              <el-input v-else-if="info.type === 7" value="应聘人员录用流程表" readonly />
              <el-input v-else-if="info.type === 8" value="员工调动审批表" readonly />
              <el-input v-else-if="info.type === 9" value="固定资产调拨单" readonly />
              <el-input v-else-if="info.type === 10" value="红酒调拨单" readonly />
              <el-input v-else-if="info.type === 11" value="采购申请单" readonly />
              <el-input v-else value="物资请购计划表" readonly />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex" justify="space-between" :gutter="20">
          <el-col :span="12">
            <el-form-item label="创建人:">
              <el-input v-model="info.sendUserName" readonly />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="创建时间:">
              <el-input v-model="info.crtTime" readonly />
            </el-form-item>
          </el-col>
        </el-row>
        <div v-if="info.type === 1">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="部门/分公司:">
                <el-input v-model="info.dept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申请人:">
                <el-input v-model="info.applyUser" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="所选印种:">
                <el-input v-model="info.seal" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申请日期:">
                <el-input v-model="info.applyTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="对方单位:">
                <el-input v-model="info.otherDept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="份数:">
                <el-input v-model="info.useNum" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="盖章内容:">
            <el-input v-model="info.sealContent" type="textarea" readonly />
          </el-form-item>
        </div>
        <div v-else-if="info.type === 2">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="呈报:">
                <el-input v-model="info.report" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="编号:">
                <el-input v-model="info.code" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="抄送:">
            <el-input v-model="info.copy" type="textarea" readonly />
          </el-form-item>
          <el-form-item label="内容主题:">
            <el-input v-model="info.theme" readonly />
          </el-form-item>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="上报部门:">
                <el-input v-model="info.reportDept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="上报时间:">
                <el-input v-model="info.reportTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="上报人:">
                <el-input v-model="info.reportUserId" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门主管:">
                <el-input v-model="info.deptUserId" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="附件页数:">
                <el-input v-model="info.filePages" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="上报说明:">
                <el-input v-if="info.reportExplain === 1" value="紧急" readonly />
                <el-input v-else-if="info.reportExplain === 2" value="1日内批复" readonly />
                <el-input v-else value="批复" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="内容说明:">
            <el-input v-model="info.contentExplain" type="textarea" readonly />
          </el-form-item>
        </div>
        <div v-else-if="info.type === 3">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="请示主题:">
                <el-input v-model="info.theme" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="请示部门:">
                <el-input v-model="info.reportDept" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="日期:">
                <el-input v-model="info.reportTime" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="请示人:">
                <el-input v-model="info.reportUserId" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="请示内容:">
            <el-input v-model="info.contentExplain" type="textarea" readonly />
          </el-form-item>
        </div>
        <div v-else-if="info.type === 4">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="申诉人姓名:">
                <el-input v-model="info.appealUser" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="所在区域:">
                <el-input v-model="info.area" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="所在分公司:">
                <el-input v-model="info.dept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="所在部门及职务:">
                <el-input v-model="info.duty" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="集团检查与考核结果描述:">
            <el-input v-model="info.resultExplain" type="textarea" readonly />
          </el-form-item>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="申诉事项:">
                <el-input v-model="info.appealItem" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申诉理由:">
                <el-input v-model="info.appealReason" readonly />
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <div v-else-if="info.type === 5">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="集团/分公司:">
                <el-input v-model="info.dept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="评估时间:">
                <el-input v-model="info.assessTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="姓名:">
                <el-input v-model="info.name" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门:">
                <el-input v-model="info.depart" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="岗位/职务:">
                <el-input v-model="info.duty" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="入职日期:">
                <el-input v-model="info.entryTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="性别:">
                <el-input v-model="info.sex" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="学历:">
                <el-input v-model="info.education" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="合同期限:">
                <el-input v-model="info.contracDeadline" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="现工资:">
                <el-input v-model="info.esalnow" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">评估项目</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="职位知识:" label-width="120px">
                <el-input v-if="info.konwledge === 1" value="低" readonly />
                <el-input v-else-if="info.konwledge === 2" value="2" readonly />
                <el-input v-else-if="info.konwledge === 3" value="3" readonly />
                <el-input v-else-if="info.konwledge === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="职位知识备注:" label-width="150px">
                <el-input v-model="info.konwRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="接受指导能力:" label-width="120px">
                <el-input v-if="info.guideAbility === 1" value="低" readonly />
                <el-input v-else-if="info.guideAbility === 2" value="2" readonly />
                <el-input v-else-if="info.guideAbility === 3" value="3" readonly />
                <el-input v-else-if="info.guideAbility === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="接受指导能力备注:" label-width="150px">
                <el-input v-model="info.guideRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="可靠性:" label-width="120px">
                <el-input v-if="info.reliability === 1" value="低" readonly />
                <el-input v-else-if="info.reliability === 2" value="2" readonly />
                <el-input v-else-if="info.reliability === 3" value="3" readonly />
                <el-input v-else-if="info.reliability === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="可靠性备注:" label-width="150px">
                <el-input v-model="info.reliabilityRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="自觉性:" label-width="120px">
                <el-input v-if="info.consciousness === 1" value="低" readonly />
                <el-input v-else-if="info.consciousness === 2" value="2" readonly />
                <el-input v-else-if="info.consciousness === 3" value="3" readonly />
                <el-input v-else-if="info.consciousness === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="自觉性备注:" label-width="150px">
                <el-input v-model="info.consciousnessRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="责任感:" label-width="120px">
                <el-input v-if="info.response === 1" value="低" readonly />
                <el-input v-else-if="info.response === 2" value="2" readonly />
                <el-input v-else-if="info.response === 3" value="3" readonly />
                <el-input v-else-if="info.response === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="责任感备注:" label-width="150px">
                <el-input v-model="info.responseRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="出勤率:" label-width="120px">
                <el-input v-if="info.attendance === 1" value="低" readonly />
                <el-input v-else-if="info.attendance === 2" value="2" readonly />
                <el-input v-else-if="info.attendance === 3" value="3" readonly />
                <el-input v-else-if="info.attendance === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="出勤率备注:" label-width="150px">
                <el-input v-model="info.attendanceRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="团队合作:" label-width="120px">
                <el-input v-if="info.team === 1" value="低" readonly />
                <el-input v-else-if="info.team === 2" value="2" readonly />
                <el-input v-else-if="info.team === 3" value="3" readonly />
                <el-input v-else-if="info.team === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="团队合作备注:" label-width="150px">
                <el-input v-model="info.teamRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="工作态度:" label-width="120px">
                <el-input v-if="info.attitude === 1" value="低" readonly />
                <el-input v-else-if="info.attitude === 2" value="2" readonly />
                <el-input v-else-if="info.attitude === 3" value="3" readonly />
                <el-input v-else-if="info.attitude === 4" value="4" readonly />
                <el-input v-else value="高" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="工作态度备注:" label-width="150px">
                <el-input v-model="info.attitudeRemark" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="部门意见:">
            <el-input v-model="info.departIdea" readonly />
          </el-form-item>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="评估结果:">
                <el-input v-if="info.assessResult === 0" value="暂缓" readonly />
                <el-input v-else-if="info.assessResult === 1" value="同意转正" readonly />
                <el-input v-else value="不同意" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item v-if="info.assessResult === 1" label="转正后岗位/职务:">
                <el-input v-model="info.positiveDuty" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="info.assessResult === 1" type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="转正后工资:">
                <el-input v-model="info.positiveSalary" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="约定年薪:">
                <el-input v-model="info.annualSalary" readonly />
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <div v-else-if="info.type === 6">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="公司:">
                <el-input v-model="info.dept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门:">
                <el-input v-model="info.depart" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="岗位:">
                <el-input v-model="info.duty" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="级别:">
                <el-input v-model="info.level" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="姓名:">
                <el-input v-model="info.name" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="入职日期:">
                <el-input v-model="info.entryTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="离职原因:">
            <el-input v-model="info.dimissionReason" type="textarea" readonly />
          </el-form-item>
        </div>
        <div v-else-if="info.type === 7">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="区域/分公司:">
                <el-input v-model="info.dept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="姓名:">
                <el-input v-model="info.name" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="性别:">
                <el-input v-model="info.sex" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="年龄:">
                <el-input v-model="info.age" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="应聘职位:">
                <el-input v-model="info.employDuty" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="资料来源:">
                <el-input v-model="info.dataSourse" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="学历:">
                <el-input v-model="info.education" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="户籍:">
                <el-input v-model="info.census" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="应聘日期:">
                <el-input v-model="info.employTime" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12" />
          </el-row>
          <el-form-item label="区域/分公司人力资源部初试意见:">
            <el-input v-model="info.option" type="textarea" readonly />
          </el-form-item>
          <el-form-item label="背调情况:">
            <el-input v-model="info.condition" type="textarea" readonly />
          </el-form-item>
          <el-form-item label="学历及各类资质证书、证件:">
            <el-input v-model="info.certFiles" type="textarea" readonly />
          </el-form-item>
          <el-form-item label="工作经历:">
            <el-input v-model="info.experience" type="textarea" readonly />
          </el-form-item>
          <el-form-item label="有无劳动纠纷及竞业协议:">
            <el-input v-model="info.agreement" type="textarea" readonly />
          </el-form-item>
          <el-form-item label="有无不良经历及重大过失行为:">
            <el-input v-model="info.fault" type="textarea" readonly />
          </el-form-item>
        </div>
        <div v-else-if="info.type === 8">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="姓名:">
                <el-input v-model="info.name" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="学历:">
                <el-input v-model="info.education" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="入职日期:">
                <el-input v-model="info.entryTime" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="生效时间:">
                <el-input v-model="info.effectTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="当月出勤天数:">
                <el-input v-model="info.attendDays" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12" />
          </el-row>
          <el-divider content-position="left">调出信息</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="公司:">
                <el-input v-model="info.dept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门:">
                <el-input v-model="info.depart" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="岗位/职务:">
                <el-input v-model="info.duty" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="薪酬:">
                <el-input v-model="info.outSalary" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">调入信息</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="公司:">
                <el-input v-model="info.foldDept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门:">
                <el-input v-model="info.foldDepart" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="岗位/职务:">
                <el-input v-model="info.foldDuty" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="薪酬:">
                <el-input v-model="info.foldSalary" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">社保</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="个人代码:">
                <el-input v-model="info.personalCode" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="参保公司:">
                <el-input v-model="info.socialCompany" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="缴纳基数:">
                <el-input v-model="info.socialBasePayment" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12" />
          </el-row>
          <el-divider content-position="left">公积金</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="汇缴公司:">
                <el-input v-model="info.fundCompany" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="缴纳基数:">
                <el-input v-model="info.fundBasePayment" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">绩效</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="系数:">
                <el-input v-model="info.coefficient" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="奖金至__月份:">
                <el-input v-model="info.bonusMonth" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-divider content-position="left">劳动合同</el-divider>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="期限:">
                <el-input v-model="info.contracDeadline" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="复印件是否移交:">
                <el-input v-model="info.handOver" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="交通费发放至__月份:">
                <el-input v-model="info.trafficMonth" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12" />
          </el-row>
        </div>
        <div v-else-if="info.type === 9">
          <el-divider content-position="right" v-bind="info.code" />
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="资产名称:">
                <el-input v-model="info.assetName" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="资产数量:">
                <el-input v-model="info.assetNum" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="资产规格:">
                <el-input v-model="info.assetSize" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="资产金额:">
                <el-input v-model="info.assetMoney" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="资产编码:">
                <el-input v-model="info.assetCode" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="资产状况:">
                <el-input v-model="info.assetState" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="调出公司（部门）:">
                <el-input v-model="info.assetOutDept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调入公司（部门）:">
                <el-input v-model="info.assetFoldDept" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="调出日期:">
                <el-input v-model="info.assetOutTime" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调入日期:">
                <el-input v-model="info.assetFoldTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="原使用人签字:">
                <el-input v-model="info.originalUser" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="现使用人签字:">
                <el-input v-model="info.nowUser" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="调出单位物管部（办公室）负责人签字:">
                <el-input v-model="info.outManagerUser" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调入单位物管部（办公室）负责人签字:">
                <el-input v-model="info.foldManagerUser" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="调出单位总经理签字:">
                <el-input v-model="info.outGeneralManager" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="调入单位总经理签字:">
                <el-input v-model="info.foldGeneralManager" readonly />
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <div v-else-if="info.type === 10">
          <div v-for="(outItem, index) in wineOutList" :key="index">
            <el-divider content-position="left">调出—{{ index + 1 }}</el-divider>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="单位:">
                  <el-input v-model="outItem.outDept" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="品名:">
                  <el-input v-model="outItem.outWineName" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="数量（瓶）:">
                  <el-input v-model="outItem.outNum" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="单价:">
                  <el-input v-model="outItem.outPrice" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="金额（元）:">
                  <el-input v-model="outItem.outMoney" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="用途:">
                  <el-input v-model="outItem.outUse" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="日期:">
                  <el-input v-model="outItem.outDate" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="责任人:">
                  <el-input v-model="outItem.outPerson" readonly />
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <div v-for="(foldItem, index) in wineFoldList" :key="index">
            <el-divider content-position="left">调入—{{ index + 1 }}</el-divider>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="单位:">
                  <el-input v-model="foldItem.foldDept" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="品名:">
                  <el-input v-model="foldItem.foldWineName" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="数量（瓶）:">
                  <el-input v-model="foldItem.foldNum" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="单价:">
                  <el-input v-model="foldItem.foldPrice" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="金额（元）:">
                  <el-input v-model="foldItem.foldMoney" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="用途:">
                  <el-input v-model="foldItem.foldUse" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="日期:">
                  <el-input v-model="foldItem.foldDate" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="责任人:">
                  <el-input v-model="foldItem.foldPerson" readonly />
                </el-form-item>
              </el-col>
            </el-row>
          </div>
        </div>
        <div v-else-if="info.type === 11">
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="申购部门:">
                <el-input v-model="info.subscribeDept" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申购日期:">
                <el-input v-model="info.subscribeTime" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <div v-for="(purchase, index) in purchaseList" :key="index">
            <el-divider content-position="left">物品序号—{{index + 1}}</el-divider>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="物品名称:">
                  <el-input v-model="purchase.name" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="规格型号:">
                  <el-input v-model="purchase.size" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="单价:">
                  <el-input v-model="purchase.price" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="数量:">
                  <el-input v-model="purchase.num" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="合价:">
                  <el-input v-model="purchase.money" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="供应商名称:">
                  <el-input v-model="purchase.providerName" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="联系电话:">
                  <el-input v-model="purchase.phone" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="备注:">
                  <el-input v-model="purchase.remark" readonly />
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="总价（元）:">
                <el-input v-model="info.subscribeTotal" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申请人:">
                <el-input v-model="info.proposer" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="信息科:">
                <el-input v-model="info.information" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="采购部经理:">
                <el-input v-model="info.purchaseManager" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="分管副总:">
                <el-input v-model="info.deputyManager" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="审核状态:">
                <el-input v-if="info.auditState === 0" value="未审" readonly />
                <el-input v-else-if="info.auditState === 1" value="审核中" readonly />
                <el-input v-else value="已审" readonly />
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <div v-else>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="请购类型:">
                <el-input v-if="info.buysType === 0" value="预算内" readonly />
                <el-input v-else value="预算外" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="请购日期:">
                <el-input v-model="info.buysDate" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="请购单编号:">
                <el-input v-model="info.buysCode" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="请购单位及部门:">
                <el-input v-model="info.buysDept" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <div v-for="(goodBuys, index) in goodBuysList" :key="index">
            <el-divider content-position="left">物资序号—{{index + 1}}</el-divider>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="物资名称:">
                  <el-input v-model="goodBuys.name" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="特殊说明（品牌）:">
                  <el-input v-model="goodBuys.explain" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="技术及品质参数（型号、规格、等级、材质）:">
              <el-input v-model="goodBuys.parameters" type="textarea" readonly />
            </el-form-item>
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="请购数量:">
                  <el-input v-model="goodBuys.num" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="交货日期:">
                  <el-input v-model="goodBuys.deliveryDate" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="备注:">
              <el-input v-model="goodBuys.remark" type="textarea" readonly />
            </el-form-item>
          </div>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="请购人/日期:">
                <el-input v-model="info.buyuserDate" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门负责人/日期:">
                <el-input v-model="info.departerDate" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="财务审核/日期:">
                <el-input v-model="info.financeDate" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="分公司及项目负责人/日期:">
                <el-input v-model="info.projectManagerDate" readonly />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row type="flex" justify="space-between" :gutter="20">
            <el-col :span="12">
              <el-form-item label="采购部负责人/日期:">
                <el-input v-model="info.purchasingManagerDate" readonly />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="审核状态:">
                <el-input v-if="info.auditState === 0" value="未审" readonly />
                <el-input v-else-if="info.auditState === 1" value="审核中" readonly />
                <el-input v-else value="已审" readonly />
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <el-row type="flex" justify="space-between" :gutter="20" v-if="info.type !== 11 && info.type !== 12">
          <el-col :span="12">
            <el-form-item label="审核状态:">
              <el-input v-if="info.auditState === 0" value="未审" readonly />
              <el-input v-else-if="info.auditState === 1" value="审核中" readonly />
              <el-input v-else value="已审" readonly />
            </el-form-item>
          </el-col>
          <el-col :span="12" />
        </el-row>
        <el-form-item label="抄送人:">
          <el-input v-model="info.copySendUsersName" type="textarea" readonly />
        </el-form-item>
        <el-form-item label="文件:">
          <el-image
            v-for="(path, index) in info.filePathList"
            :key="path + index"
            style="width: 100px; height: 100px;margin: 5px;"
            :src="path"
            fit="cover"
            :preview-src-list="info.filePathList"
          />
        </el-form-item>
        <el-form-item label="审核信息:" style="background-color: #EBEEF5" />
        <el-collapse v-model="collapseNames" @change="handleChange">
          <el-collapse-item v-for="(item, index) in auditList" :key="item.userId" :title="item.userName" :name="index">
            <el-row type="flex" justify="space-between" :gutter="20">
              <el-col :span="12">
                <el-form-item label="审核状态:">
                  <el-input v-if="item.state === 0" value="未审" readonly />
                  <el-input v-else value="已审" readonly />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="审核时间:">
                  <el-input v-model="item.time" readonly />
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="审核内容:">
              <el-input v-model="item.content" type="textarea" readonly />
            </el-form-item>
          </el-collapse-item>
        </el-collapse>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="centerDialogVisible = false">关 闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import { getInfo, page } from '@/api/app/plan.js'

  export default {
    data() {
      return {
        // 总条数
        total: 0,
        // 每页显示个数
        pageSize: 10,
        // 页码
        currentPage: 1,
        postForm: { searchName: '' },
        info: {},
        tableData: [],
        centerDialogVisible: false,
        title: '查看',
        auditList: [],
        collapseNames: ['0'],
        wineOutList: [],
        wineFoldList: [],
        purchaseList: [],
        goodBuysList: [],
        rules: {
        }
      }
    },
    created() {
      this.getData()
    },
    methods: {
      // 分页查询
      handleCurrentChange(val) {
        this.currentPage = val
        this.getData()
      },
      // 查询条件
      query() {
        this.currentPage = 1
        this.getData()
      },
      getData() {
        // 请求分页参数
        page(this.pageSize, this.currentPage, this.postForm.searchName).then(response => {
          this.total = response.count
          this.tableData = response.data
        })
      },
      /**
       * 编辑
       * @param row
       */
      editInfo(index, row) {
        this.collapseNames = ['0']
        this.centerDialogVisible = true
        getInfo(row.id).then(response => {
          this.info = response.data
          this.auditList = JSON.parse(this.info.auditInfo)
          if (this.info.type === 10) {
            var wineAllotInfo = JSON.parse(this.info.wineAllotInfo)
            this.wineOutList = wineAllotInfo.outList
            this.wineFoldList = wineAllotInfo.foldList
          } else if (this.info.type === 11) {
            this.purchaseList = JSON.parse(this.info.subscribeInfo)
          } else if (this.info.type === 12) {
            this.goodBuysList = JSON.parse(this.info.buysInfo)
          }
        })
      }
    }
  }
</script>

